home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Arkanoid Flash.swf / scripts / frame_25 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1020 b   |  37 lines

  1. i = "1";
  2. while(noOfB >= i)
  3. {
  4.    bonuslife_y = getProperty("bonuslife" add i, _Y);
  5.    bonuslife_y += "6";
  6.    setProperty("bonuslife" add i, _Y, bonuslife_y);
  7.    if("390" < bonuslife_y)
  8.    {
  9.       bat_x = getProperty("/bat", _X);
  10.       bat_left = bat_x - batWidth / "2";
  11.       bat_right = bat_x + batWidth / "2";
  12.       bonuslife_x = getProperty("bonuslife" add i, _X);
  13.       bonuslife_left = bonuslife_x - "10";
  14.       bonuslife_right = bonuslife_x + "10";
  15.       if(bonuslife_left >= bat_left and bat_right >= bonuslife_right)
  16.       {
  17.          tellTarget("/soundFX")
  18.          {
  19.             gotoAndStop("bonuslife");
  20.             play();
  21.          }
  22.          trace("You\'ve just got BONUS LIFE");
  23.          lives_left += "1";
  24.          power_up = "bonuslife";
  25.          call("reset_capsules");
  26.          removeMovieClip("bonuslife" add i);
  27.          onscreen_B = "0";
  28.       }
  29.       else
  30.       {
  31.          removeMovieClip("bonuslife" add i);
  32.          onscreen_B = "0";
  33.       }
  34.    }
  35.    i += "1";
  36. }
  37.